import { ApiCall } from "tsrpc";
import { ReqRandom_EntrustTask, ResRandom_EntrustTask } from "../../../../shared/master/bag/function/PtlRandom_EntrustTask";
import { player } from "../../../../model/fight/body/player";

export default async function (call: ApiCall<ReqRandom_EntrustTask, ResRandom_EntrustTask>) {
    call.succ({})
    let user = call.req._player as player;
    let res = user.check_wallet(0, 0, [{ id: 'prop-10', v: 1 }], false, '刷新重置委托任务', true);
    if (!res.state) {
        return;
    }
    let tpl = user.get_entrustTask()?.update(user);
    tpl.look(user)
}